<%-- 
    Document   : adminHome
    Created on : Oct 14, 2013, 2:34:25 PM
    Author     : h10t93
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
        <form name="frm" method="POST">
            <body onload="frm.action='ManageServlet?action=load'">
        <h1>Hello Admin</h1>

        <p>List Complaint not assignment !</p>
    
            <p>report detail:</p>
            <input type="submit" value="view reports"
                   onclick="frm.action='ManageServlet?action=reportDetail'"/>
            <p>view pending complaints</p>
            <input type="submit" value="view"
                   onclick="frm.action='ManageServlet?action=pendingComp'"/>
            <br/>
            <br/>
            <table border="1">
                <tr>
                    <th>ID Complaint</th>
                    <th>ID Employee</th>
                    <th>Title</th>
                    <th>Complaint Type</th>
                    <th>Content</th>
                    <th>Date</th>
                    <th>Select staff to assignment</th>
                </tr>
                <c:forEach var="p" items="${sessionScope['list']}">
                    <tr>
                        <td>${p.complaintID}</td>
                        <td>${p.employeeID}</td>
                        <td>${p.title}</td>
                        <td>${p.complaintType}</td>
                        <td>${p.compContent}</td>
                        <td>${p.date}</td>
                        <td>
                            <input type="submit" value="Select"
                                   onclick="frm.action='ManageServlet?action=assignment&idComp=${p.complaintID}'"/>
                        </td>
                    </tr>
                </c:forEach>
            </table>
    </body>
    </form>
</html>
